get the unique rows from table laravel

105

get unique values in laravel -

$users = User::select('name')->distinct()->get();

get the unique rows from table laravel -

$categories = Machine::distinct('category')->pluck('category');


Comments

Submit
0 Comments